# -*- mode: python -*-

Import("env")

env.Library(
        target='index_descriptor',
        source=[
            'index_descriptor.cpp',
        ],
        LIBDEPS=[
            '$BUILD_DIR/mongo/base',
        ],
)

env.Library(
        target='key_generator',
        source=[
            'btree_key_generator.cpp',
            'expression_keys_private.cpp',
        ],
        LIBDEPS=[
            'expression_params',
            '$BUILD_DIR/mongo/base',
            '$BUILD_DIR/mongo/db/fts/base',
            '$BUILD_DIR/mongo/db/geo/geoparser',
            '$BUILD_DIR/mongo/db/index_names',
            '$BUILD_DIR/mongo/db/mongohasher',
            '$BUILD_DIR/third_party/s2/s2',
        ],
)

env.Library(
        target='external_key_generator',
        source=[
            'external_key_generator.cpp',
        ],
        LIBDEPS=[
            'key_generator',
            'expression_params',
            '$BUILD_DIR/mongo/base',
        ],
)

env.Library(
        target='expression_params',
        source=[
            'expression_params.cpp',
            's2_common.cpp'
        ],
        LIBDEPS=[
            '$BUILD_DIR/mongo/base',
            '$BUILD_DIR/mongo/bson/util/bson_extract',
            '$BUILD_DIR/mongo/db/geo/geometry',
            '$BUILD_DIR/mongo/db/geo/geoparser',
            '$BUILD_DIR/mongo/db/mongohasher',
            '$BUILD_DIR/third_party/s2/s2',
        ]
)

env.CppUnitTest(
        target='btree_key_generator_test',
        source=[
            'btree_key_generator_test.cpp',
        ],
        LIBDEPS=[
            'key_generator',
            '$BUILD_DIR/mongo/db/mongohasher',
        ],
)
